package com.kaili.finance.service.impl; /**
 * Created by :zengshuai
 * Created time :18-5-22.
 * Company :杭州凯立通信有限公司
 */

import com.baomidou.mybatisplus.plugins.Page;
import com.kaili.finance.pojo.entity.*;
import com.kaili.finance.mapper.FinCheckBillMapper;
import com.kaili.finance.pojo.dto.customerBill.FinCheckBillQueryDTO;
import com.kaili.finance.pojo.dto.driver.FinDriverCalcQueryDTO;
import com.kaili.finance.pojo.dto.siteCalc.FinSiteCalcQueryDTO;
import com.kaili.finance.pojo.dto.transfer.FinTransferCalcQueryDTO;
import com.kaili.finance.pojo.entity.FinCheckBillExport;
import com.kaili.finance.pojo.entity.FinDriverCalcExport;
import com.kaili.finance.pojo.entity.FinSiteCalcExport;
import com.kaili.finance.pojo.entity.FinTransferCalcExport;
import com.kaili.finance.pojo.vo.*;
import com.kaili.finance.service.FinCheckBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class FinCheckBillServiceImpl implements FinCheckBillService{

    @Autowired
    private FinCheckBillMapper finCheckBillMapper;

    @Override
    public Page<FinCheckBillVO> selectCheckBill(Page<FinCheckBillVO> page, FinCheckBillQueryDTO dto) {
        List<FinCheckBillVO> checkBills = finCheckBillMapper.selectCheckBill(page,dto);
        return page.setRecords(checkBills);
    }

    @Override
    public Page<FinDriverCalcVO> queryDriverByKeywords(Page<FinDriverCalcVO> page, FinDriverCalcQueryDTO dto) {
        List<FinDriverCalcVO> drivers = finCheckBillMapper.queryDriverByKeywords(page,dto);
        return page.setRecords(drivers);
    }

    @Override
    public Page<FinTransferCalcVO> queryTransferByKeywords(Page<FinTransferCalcVO> page, FinTransferCalcQueryDTO dto) {
        List<FinTransferCalcVO> transfers = finCheckBillMapper.queryTransferByKeywords(page,dto);
        return page.setRecords(transfers);
    }

    @Override
    public Page<FinSiteCalcVO> querySiteCalc(Page<FinSiteCalcVO> page, FinSiteCalcQueryDTO dto) {
        List<FinSiteCalcVO> sites = finCheckBillMapper.querySiteCalc(page,dto);
        return page.setRecords(sites);
    }

    @Override
    public int driverCalc(Map<String, Object> map) {
        return finCheckBillMapper.driverCalc(map);
    }

    @Override
    public int transferCalc(Map<String, Object> map) {
        return finCheckBillMapper.transferCalc(map);
    }

    @Override
    public int siteCalc(Map<String, Object> map) {
        return finCheckBillMapper.siteCalc(map);
    }

    @Override
    public List<FinDictVO> queryAllPayMent() {
        return finCheckBillMapper.queryAllPayMent();
    }

    @Override
    public int checkBillCalc(Map<String, Object> map) {
        return finCheckBillMapper.checkBillCalc(map);
    }

    @Override
    public List<FinDriverCalcExport> queryDriverByKeywordsExport(Map search) {
        return finCheckBillMapper.queryDriverByKeywordsExport(search);
    }

    @Override
    public List<FinTransferCalcExport> queryTransferByKeywordsExport(Map search) {
        return finCheckBillMapper.queryTransferByKeywordsExport(search);
    }

    @Override
    public List<FinCheckBillExport> selectCheckBillExport(Map search) {
        return finCheckBillMapper.selectCheckBillExport(search);
    }

    @Override
    public List<FinSiteCalcExport> querySiteByKeywordsExport(Map search) {
        return finCheckBillMapper.querySiteByKeywordsExport(search);
    }
}
